﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <Header>
    <Title>Presenter</Title>
    <Author>jinlei</Author>
    <Shortcut>Presenter</Shortcut>
    <Description>Presenter</Description>
    <SnippetTypes>
      <SnippetType>SurroundsWith</SnippetType>
      <SnippetType>Expansion</SnippetType>
    </SnippetTypes>
  </Header>
  <Snippet>
    <Declarations>
      <Literal>
        <ID>XXXXXXX</ID>
        <Default>XXXXXXX</Default>
      </Literal>
    </Declarations>
    <Code Language="CSharp">
      <![CDATA[#region 变量
		
		private XXXXXXX _model = null;
        
		#endregion

        #region 构造函数

        public XXXXXXX(XXXXXXX view) : base(view)
        {
			_model = new XXXXXXX();

            View.Load += View_Load;
            View.FormClosing += View_FormClosing;
            View.FormClosed += View_FormClosed;
        } 

        #endregion

        #region 页面加载与关闭
        private void View_FormClosed(object sender, Windows.Forms.FormClosedEventArgs e)
        {
            View.Load -= View_Load;
            View.FormClosing -= View_FormClosing;
            View.FormClosed -= View_FormClosed;
        }

        private void View_FormClosing(object sender, Windows.Forms.FormClosingEventArgs e)
        {

        }

        private void View_Load(object sender, EventArgs e)
        {
            View.Model = _model;
        }
        #endregion

        #region IView

        #endregion

        #region IService

        #endregion]]>
    </Code>
  </Snippet>
</CodeSnippet>